#include <iostream>
#include <vector>
using namespace std;

int main(int argc, char const *argv[])
{
    /* code */
    vector<int> Myarray(3);
    Myarray[0] = 100;
    Myarray[1] = 200;
    Myarray[2] = 300;
    cout << "Array length \t" << sizeof(Myarray)/sizeof(int) << endl;
    for(unsigned i = 0; i < Myarray.size(); i++)
    {
        cout << Myarray[i] << endl;
    }
    //add a new element to array
    cout << "Input a number that will be added to old array" << endl;
    int AnotherNum;
    cin >> AnotherNum;
    Myarray.push_back(AnotherNum);
    cout << "Array size now is: \t"<< Myarray.size() << endl;
    cout << Myarray[Myarray.size() -1] << endl;
    return 0;
}
